package com.nuoniu.sibanyun.mapper.expenses;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.expenses.ExpensesProperty;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 费用中心-续费管理 Mapper 接口
 * </p>
 *
 * @author 小啊刚
 * @since 2022-05-09
 */
public interface ExpensesPropertyMapper extends BaseMapper<ExpensesProperty> {

    /**
     * 查询今日自动续费的资源
     * @return
     */
    @Select("SELECT * FROM expenses_property  WHERE end_time < NOW() AND status = 1 AND renewal_type = 1")
    List<ExpensesProperty> listDeadlineProperty();
    /**
     * 查询今日自动续费的资源
     * @return
     */
    @Select("SELECT * FROM expenses_property  WHERE end_time < NOW() AND status = 1 AND renewal_type = 2")
    List<ExpensesProperty> listAutoRenewalProperty();

}
